from typing import Dict, Any
from intelli_port.model.qwen.provider_manager import ProviderManager


class QwenInferencer:
    def __init__(self):
        self.pm = ProviderManager()

    async def infer_short_text(self, text: str, lang: str = "zh") -> Dict[str, Any]:
        return await self.pm.infer(text, lang)

    def stats(self) -> Dict[str, Any]:
        return self.pm.stats()

    def set_priority(self, providers: list[str]) -> Dict[str, Any]:
        return self.pm.set_priority(providers)


def create_qwen_inferencer() -> QwenInferencer:
    return QwenInferencer()